<?
$habits=getHabitList();
foreach($habits as $val) {
	echo "
<a href=\"" . $_SERVER['PHP_SELF'] . "?action=view&type=habit&id=" . $val['habit_id'] . "\">
" . $val['habit_name'] . "</a> \n" . 
"<a href=\"" . $_SERVER['PHP_SELF'] . "?action=edit&type=habit&id=" . $val['habit_id'] . "\">" . 
"(Edit)</a> " . 
"<a href=\"" . $_SERVER['PHP_SELF'] . "?action=delete&type=habit&id=" . $val['habit_id'] . "\">\n" . 
"(Delete Habit)</a><br>";
}
echo "" . 
"<a href=\"" . $_SERVER['PHP_SELF'] . "?action=new&type=habit\">New Habit</a><br>
";

